/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2019-2021. All rights reserved.
 * Description: HCOM operators plugin API
 */

#ifndef HCOM_OPS_STORES_H
#define HCOM_OPS_STORES_H

#include "common/opskernel/ops_kernel_info_store.h"
#include "common/optimizer/graph_optimizer.h"

using OpsKernelInfoStorePtr = std::shared_ptr<ge::OpsKernelInfoStore>;
using GraphOptimizerPtr = std::shared_ptr<ge::GraphOptimizer>;

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus

/**
 * @brief Initialize HCOM operators plugin.
 *
 * @param options Input parameter. Options must contain rank table path, deploy mode, rank id, pod name.
 * @return ge::SUCCESS success; others：fail.
 */
ge::Status Initialize(const std::map<string, string> &options);

/**
 * @brief Finalize HCOM operators plugin.
 *
 * @return ge::SUCCESS success; others: fail.
 */
ge::Status Finalize();

/**
 * @brief Get the information store of HCOM operators.
 *
 * @param opKernInfos A map identifying the information store of HCOM operators.
 */
void GetOpsKernelInfoStores(std::map<string, OpsKernelInfoStorePtr> &opKernInfos);

/**
 * @brief Get the graph optimizer of HCOM operators.
 *
 * @param graphOptimizers A map identifying the graph optimizer of HCOM operators.
 */
void GetGraphOptimizerObjs(std::map<string, GraphOptimizerPtr> &graphOptimizers);

#ifdef __cplusplus
}
#endif // __cplusplus
#endif // HCOM_OPS_STORES_H
